﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/BackendMain.master"
    AutoEventWireup="true" CodeFile="Report.aspx.cs" Inherits="Backend_Report" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table style="width: 100%;">
        <tr>
            <td>
                <table border="1px" style="width: 80%; border-collapse: collapse; border-spacing: 1px;
                    border-width: thin; border-style: solid;">
                    <tr>
                        <td>
                            Client Name
                        </td>
                        <td>
                            Note
                        </td>
                        <td>
                            IP
                        </td>
                        <td>
                            Register Time
                        </td>
                        <td>
                            Duration
                        </td>
                    </tr>
                    <asp:Repeater runat="server" ID="rpt">
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <%# Eval("ClientName")%>
                                </td>
                                <td>
                                    <%# Eval("Note")%>
                                </td>
                                <td>
                                    <%# Eval("Ip") %>
                                </td>
                                <td>
                                    <%# Eval("RegisterTime") %>
                                </td>
                                <td>
                                    <%# Eval("Duration") %>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
                <%--<asp:GridView ID="GridView1" Width="80%" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="Id" PageSize="50">
                    <Columns>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True" SortExpression="Id"
                            Visible="false" />
                        <asp:BoundField DataField="EmployeeName" HeaderText="EmployeeName" SortExpression="EmployeeName" />
                        <asp:BoundField DataField="ClientName" HeaderText="ClientName" SortExpression="ClientName" />
                        <asp:BoundField DataField="ServiceName" HeaderText="ServiceName" SortExpression="ServiceName" />
                        <asp:BoundField DataField="Ip" HeaderText="Ip" SortExpression="Ip" />
                        <asp:BoundField DataField="CreateTime" HeaderText="CreateTime" SortExpression="CreateTime" />
                        <asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" />
                        <asp:CheckBoxField DataField="IsDeleted" HeaderText="IsDeleted" SortExpression="IsDeleted" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:EmployeeTrackingConnectionString %>"
                    SelectCommand="SELECT t.Id, e.EmployeeName, t.ClientName, s.ServiceName, t.Ip, t.CreateTime, t.Note, t.IsDeleted FROM EtServiceTracking t
                        LEFT JOIN EtEmployeeInfo e ON t.EmployeeId = e.Id
                        LEFT JOIN EtServiceInfo s ON t.ServiceId = s.Id
                        WHERE  t.IsDeleted =0 AND e.IsDeleted = 0 AND s.IsDeleted = 0
                        ORDER BY CreateTime DESC" UpdateCommand="UPDATE EtServiceTracking SET ClientName = @ClientName, IsDeleted =@IsDeleted WHERE Id=@Id;">
                    <UpdateParameters>
                        <asp:Parameter Name="ClientName" Type="String" />
                        <asp:Parameter Name="IsDeleted" Type="Boolean" />
                        <asp:Parameter Name="Id" Type="Object" />
                    </UpdateParameters>
                </asp:SqlDataSource>--%>
            </td>
        </tr>
    </table>
</asp:Content>
